#ifndef CAMERA_H
#define CAMERA_H

#include "Entity.h"

class Entity;

class Camera
{
	private:
									///Camera Matrix
		D3DXMATRIXA16 cameraMatrix;
									///Camera Frstum Planes [top, bottim, left, right, near, far]
		D3DXPLANE  frustum[6];
									///Camera's Position Values
		float position[3];
									///Camera's Rotation Value
		float R;

	public:
						///Constructor
		Camera();
						///Destructor
		~Camera();

									///Move the camera
		void Pan(float x, float y);
									///Rotate the camera
		void Rotate(float r);
									///Zoom in/out
		void Zoom(float z);
											///Center camera onto object
		void Center(Entity * object = NULL);

											///Return Camera Position
		float GetXPosition();
											///Return Camera Position
		float GetYPosition();
											///Return Camera Position
		float GetZPosition();
											///Return Camera Rotation
		float GetRotation();
											///Return Camera Matrix
		D3DXMATRIXA16 * GetMatrix();

													///Create The Planes that make up the frustum
		void buildFrustum(LPDIRECT3DDEVICE9 d3ddev);
																	///Check if object is inside frustum
		bool sphereInFrustum(Entity * object, float radius);
																	///Check if object is inside frustum
		bool boxInFrustum(Entity * object);

};

#endif